package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.GysptWarehouseRequisitioMapper;
import com.ruoyi.gcgl.domain.GysptWarehouseRequisitio;
import com.ruoyi.gcgl.service.IGysptWarehouseRequisitioService;
import com.ruoyi.common.core.text.Convert;

/**
 * 调拨单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-01
 */
@Service
public class GysptWarehouseRequisitioServiceImpl implements IGysptWarehouseRequisitioService 
{
    @Autowired
    private GysptWarehouseRequisitioMapper gysptWarehouseRequisitioMapper;

    /**
     * 查询调拨单
     * 
     * @param id 调拨单主键
     * @return 调拨单
     */
    @Override
    public GysptWarehouseRequisitio selectGysptWarehouseRequisitioById(Long id)
    {
        return gysptWarehouseRequisitioMapper.selectGysptWarehouseRequisitioById(id);
    }

    /**
     * 查询调拨单列表
     * 
     * @param gysptWarehouseRequisitio 调拨单
     * @return 调拨单
     */
    @Override
    public List<GysptWarehouseRequisitio> selectGysptWarehouseRequisitioList(GysptWarehouseRequisitio gysptWarehouseRequisitio)
    {
        return gysptWarehouseRequisitioMapper.selectGysptWarehouseRequisitioList(gysptWarehouseRequisitio);
    }

    /**
     * 新增调拨单
     * 
     * @param gysptWarehouseRequisitio 调拨单
     * @return 结果
     */
    @Override
    public int insertGysptWarehouseRequisitio(GysptWarehouseRequisitio gysptWarehouseRequisitio)
    {
        return gysptWarehouseRequisitioMapper.insertGysptWarehouseRequisitio(gysptWarehouseRequisitio);
    }

    /**
     * 修改调拨单
     * 
     * @param gysptWarehouseRequisitio 调拨单
     * @return 结果
     */
    @Override
    public int updateGysptWarehouseRequisitio(GysptWarehouseRequisitio gysptWarehouseRequisitio)
    {
        return gysptWarehouseRequisitioMapper.updateGysptWarehouseRequisitio(gysptWarehouseRequisitio);
    }

    /**
     * 批量删除调拨单
     * 
     * @param ids 需要删除的调拨单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseRequisitioByIds(String ids)
    {
        return gysptWarehouseRequisitioMapper.deleteGysptWarehouseRequisitioByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除调拨单信息
     * 
     * @param id 调拨单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseRequisitioById(Long id)
    {
        return gysptWarehouseRequisitioMapper.deleteGysptWarehouseRequisitioById(id);
    }
}
